/* Copyright (c) 2014, the Dart project authors.  Please see the AUTHORS file */
/* for details. All rights reserved. Use of this source code is governed by a */
/* BSD-style license that can be found in the LICENSE file. */

/* CodeMirror tweaks */

#editpanel .CodeMirror {
  font-family: 'Inconsolata', monospace;
  background: inherit;
  color: inherit;
  box-shadow: none;
  line-height: 20px;
  position: absolute;
  top: 0;
  left: 0;
  height: 100%;
  width: 100%;
}

#editpanel .CodeMirror-gutters {
  background: inherit !important;
  border-right: none;
  box-shadow: none;
}

#editpanel .CodeMirror-lines {
  padding: 0;
}

.squiggle-error {
  border-bottom: 2px solid #F7977A;
}

.squiggle-warning {
  border-bottom: 2px solid #FFF79A;
}

.squiggle-info {
  border-bottom: 2px solid #7EA7D8;
}

/* Zenburn theme overrides for code completion. */

.CodeMirror-hints {
  border: 1px solid #cc9393;
  font-size: 100%;
  background: grey;
}

.CodeMirror-hint {
  background: #3f3f3f;
  color: #dcdccc;
  border-radius: 0;
  max-width: 30em; /* overrides the default 19em in show-hint.css */
  text-overflow: ellipsis;
  padding-right: 10px;
}

.CodeMirror-hint em {
  font-style: normal;
  font-weight: bold;
}

li.CodeMirror-hint-active {
  background: #545454;
}

.CodeMirror-hints::-webkit-scrollbar-track {
  box-shadow: inset 0 0 6px rgba(0,0,0,0.3);
  background-color: #545454;
}

.CodeMirror-hints::-webkit-scrollbar {
  width: 6px;
  background-color: #545454;
}

.CodeMirror-hints::-webkit-scrollbar-thumb {
  background-color: #000000;
}

/* Selectors for the code completion UI. */

#documentation h1::before, .CodeMirror-hint::before {
  color: #333;
  font-weight: bold;
  font-family: "Courier", monospace;
  box-sizing: border-box;
  line-height: 14px;
  width: 15px;
  height: 15px;
  vertical-align: middle;
  font-size: 12px;
  display: inline-block;
  text-align: center;
  margin: 0 5px 2px 0;
  border-radius: 50%;
}

.CodeMirror-hint::before {
  content: " ";
}

.deprecated {
  text-decoration: line-through;
}

.type-keyword::before {
  background: radial-gradient(#f0dfaf, #e0cfa1);
  content : "k";
}

.type-class::before {
  content: "C";
  background: radial-gradient(#A2D7F5, #8ebfd7);
  line-height: 16px; /*for vertical centering */
}

.type-function_type_alias::before {
  content: "T";
  background: radial-gradient(#A2D7F5, #8ebfd7);
  line-height: 16px; /*for vertical centering */
}

.type-getter::before {
  content: "\21FD";
  background: radial-gradient(#e1C2ff, #cdb7e8);
}

.type-setter::before {
  content: "\21FE";
  background: radial-gradient(#e1C2ff, #cdb7e8);
}

.type-getter_and_setter::before {
  content: "\21FF";
  background: radial-gradient(#e1C2ff, #cdb7e8);
}

.type-method::before {
  content: "m";
  background: radial-gradient(#fdc0b8, #eb9a94);
}

.type-local_variable::before {
  content: "v"; /*maybe l? */
  background: radial-gradient(#f0c183, #da9f5e);
}

.type-library::before {
  content: "l";
  background: radial-gradient(#f0c183, #da9f5e);
}

.type-top_level_variable::before {
  content: "v";
  background: radial-gradient(#f0c183, #da9f5e);
}

.type-field::before {
  content: "f";
  line-height: 16px; /*for vertical centering */
  background: radial-gradient(#f0c183, #da9f5e);
}

.type-function::before {
  content: "\03BB"; /*lambda */
  line-height: 16px; /*for vertical centering */
  background: radial-gradient(#fdc0b8, #eb9a94);
}

.type-no_suggestions::before {
  content: "?";
  background: radial-gradient(#fff, #eee);
}

.type-quick_fix {
  font-family: "Inconsolata", sans-serif;
  font-size: 12pt;
}

.type-quick_fix::before {
  content: " ";
  background: url('../elements/wrench.svg') no-repeat;
  background-size: 15px 15px;
  height: 16px;
  width: 16px;
  margin-right: 2px;
}

/* Chrome specific styling hack, see #236. */
@media all and (-webkit-min-device-pixel-ratio:0) and (min-resolution: .001dpcm) {
  #documentation h1::before,
  .CodeMirror-hint::before {
    line-height: 16px;  /*for vertical centering */
  }

  .type-field::before,
  .type-function_type_alias::before,
  .type-function::before,
  .type-class::before {
    line-height: 18px; /*for vertical centering */
  }
}
